@(catForm: Form[Cat], dogForm: Form[Dog], cats: Seq[Cat], dogs: Seq[Dog])(implicit request: MessagesRequestHeader)

@import helper._

@main("Cat & Dog database") {
<div>
  <div id="cats">
    <h2>Insert a kitty cat here:</h2>

    @form(routes.Application.insertCat) {
      @inputText(catForm("name"))
      @inputText(catForm("color"))
      @CSRF.formField

      <input type="submit"/>
    }

    <h2>Previously inserted cats:</h2>
    <table>
      <tr><th>Name</th><th>Color</th></tr>
      @for(c <- cats){ 
      <tr><td>@c.name</td><td>@c.color</td></tr>
      }
    </table>
  </div>

  <div id="dogs">
    <h2>Insert a dog here:</h2>

    @form(routes.Application.insertDog) {
      @inputText(dogForm("name"))
      @inputText(dogForm("color"))
      @CSRF.formField

      <input type="submit"/>
    }

    <h2>Previously inserted dogs:</h2>
    <table>
      <tr><th>Name</th><th>Color</th></tr>
      @for(d <- dogs){ 
      <tr><td>@d.name</td><td>@d.color</td></tr>
      }
    </table>
  </div>
</div>
}
